package yxy.game.pm2.module.union.rank;

import yxy.game.pm2.bean.ServerBean;
import yxy.game.pm2.bean.area.AreaBean;
import yxy.game.pm2.bean.area.AreaGroupBean;
import yxy.game.pm2.bean.module.rank.PlayerRankModule;

//按战区内排行：联盟战力排行
public class RankAreaGroupPowerUnion extends UnionAreaGroupRankModule {

	public RankAreaGroupPowerUnion(AreaGroupBean areaGroupBean) {
		super(areaGroupBean);
	}

	@Override
	public String rankName() {
		return PlayerRankModule.getAllRankNames().get(8);
	}

	@Override
	protected long valuePlastic(long value) {
		return value * 10;
	}

	@Override
	protected long valueRestore(long score) {
		return score / 10;
	}

	static public RankAreaGroupPowerUnion get(int areaGroupId) {
		AreaGroupBean areaGroupBean = AreaGroupBean.get(areaGroupId);
		if (areaGroupBean == null) {
			return null;
		}
		return new RankAreaGroupPowerUnion(areaGroupBean);
	}
}
